package com.RedRiver.hospitalsystem.finance_service.service;

import com.RedRiver.hospitalsystem.finance_service.client.param.TestTimeClient;
import com.RedRiver.hospitalsystem.finance_service.infra.model.Bill;
import com.RedRiver.hospitalsystem.finance_service.service.from.*;
import com.RedRiver.hospitalsystem.finance_service.service.info.FindBillAllInfo;
import com.RedRiver.hospitalsystem.finance_service.service.info.FindBillAllListInfo;
import com.RedRiver.hospitalsystem.result.Result;
import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 龙世超
 * @since 2022-04-26
 */
public interface BillService extends IService<Bill> {

    FindBillAllInfo createBill(CreateBillFrom copyone);

    FindBillAllListInfo findBillAll(FindBillAllForm copyone);

    String aliPay(Integer id)throws AlipayApiException ;

    FindBillAllInfo returnUrl()throws UnsupportedEncodingException;

    void notyfyUrl()throws UnsupportedEncodingException;

    Result<String> notOrder(Integer id);

    Result<String> notYesOrder(Integer id)throws Exception;


    String toRefund(RefundFrom refundFrom, HttpServletRequest request, HttpServletResponse response)throws Exception;


    Bill changeBillById(ChangeBillByIdFrom byIdFrom);

    FindBillAllInfo findBillByCheckId(Integer id);

    String moniYibao(Integer id);

    FindBillAllInfo getOneById(Integer id);

}
